import request from '@/utils/request'

// 查询模板语句列表
export function listStatement(query) {
  return request({
    url: '/system/statement/list',
    method: 'get',
    params: query
  })
}

export function listStatementByUser(query) {
  return request({
    url: '/system/statement/listByUser',
    method: 'get',
    params: query
  })
}

export function listStatementByDept(query) {
  return request({
    url: '/system/statement/listByDept',
    method: 'get',
    params: query
  })
}

// 查询模板语句详细
export function getStatement(tempId) {
  return request({
    url: '/system/statement/' + tempId,
    method: 'get'
  })
}

// 新增模板语句
export function addStatement(data) {
  return request({
    url: '/system/statement',
    method: 'post',
    data: data
  })
}

// 修改模板语句
export function updateStatement(data) {
  return request({
    url: '/system/statement',
    method: 'put',
    data: data
  })
}

// 删除模板语句
export function delStatement(tempId) {
  return request({
    url: '/system/statement/' + tempId,
    method: 'delete'
  })
}
